gdk_broadway_surface_move_resize (surface, FALSE, 0, 0, width, height);
}
+static void
+gdk_broadway_surface_move (GdkSurface *surface,
+ gint x,
+ gint y)
+{
+ gdk_broadway_surface_move_resize (surface, TRUE, x, y, -1, -1);
+}
+
static void
gdk_broadway_surface_raise (GdkSurface *surface)
{
x = mv_resize->moveresize_orig_x + dx;
y = mv_resize->moveresize_orig_y + dy;
- gdk_surface_move (mv_resize->moveresize_surface, x, y);
+ gdk_broadway_surface_move (mv_resize->moveresize_surface, x, y);
}
}
gint *width,
gint *height);
-void gdk_surface_move (GdkSurface *surface,
- gint x,
- gint y);
-
void gdk_surface_move_resize (GdkSurface *surface,
gint x,
gint y,
static void gdk_surface_set_frame_clock (GdkSurface *surface,
GdkFrameClock *clock);
+static void gdk_surface_move_resize_internal (GdkSurface *surface,
+ gboolean with_move,
+ gint x,
+ gint y,
+ gint width,
+ gint height);
+
static guint signals[LAST_SIGNAL] = { 0 };
static GParamSpec *properties[LAST_PROP] = { NULL, };
if (final_rect.width != surface->width || final_rect.height != surface->height)
gdk_surface_move_resize (surface, final_rect.x, final_rect.y, final_rect.width, final_rect.height);
else
- gdk_surface_move (surface, final_rect.x, final_rect.y);
+ gdk_surface_move_resize_internal (surface, TRUE, final_rect.x, final_rect.y, -1, -1);
gdk_surface_get_origin (toplevel, &x, &y);
final_rect.x -= x;
gdk_surface_move_resize_toplevel (surface, with_move, x, y, width, height);
}
-
-
-/*
- * gdk_surface_move:
- * @surface: a #GdkSurface
- * @x: X coordinate relative to surface’s parent
- * @y: Y coordinate relative to surface’s parent
- *
- * Repositions a surface relative to its parent surface.
- * For toplevel surfaces, window managers may ignore or modify the move;
- * you should probably use gtk_window_move() on a #GtkWindow widget
- * anyway, instead of using GDK functions. For child surfaces,
- * the move will reliably succeed.
- *
- * If you’re also planning to resize the surface, use gdk_surface_move_resize()
- * to both move and resize simultaneously, for a nicer visual effect.
- **/
-void
-gdk_surface_move (GdkSurface *surface,
- gint x,
- gint y)
-{
- gdk_surface_move_resize_internal (surface, TRUE, x, y, -1, -1);
-}
-
/**
* gdk_surface_resize:
* @surface: a #GdkSurface
g_assert (_win32_main_thread == NULL ||
_win32_main_thread == g_thread_self ());
- gdk_surface_move (drag_win32->drag_surface,
- x_root - drag_win32->hot_x,
- y_root - drag_win32->hot_y);
+ gdk_win32_surface_move (drag_win32->drag_surface,
+ x_root - drag_win32->hot_x,
+ y_root - drag_win32->hot_y);
gdk_surface_raise (drag_win32->drag_surface);
}
gint64 current_time;
double f;
double t;
+ gint x, y;
if (!frame_clock)
return G_SOURCE_REMOVE;
t = ease_out_cubic (f);
gdk_surface_show (drag->drag_surface);
- gdk_surface_move (drag->drag_surface,
- drag->util_data.last_x + (drag->start_x - drag->util_data.last_x) * t - drag->hot_x,
- drag->util_data.last_y + (drag->start_y - drag->util_data.last_y) * t - drag->hot_y);
+ x = (drag->util_data.last_x +
+ (drag->start_x - drag->util_data.last_x) * t -
+ drag->hot_x);
+ y = (drag->util_data.last_y +
+ (drag->start_y - drag->util_data.last_y) * t -
+ drag->hot_y);
+ gdk_win32_surface_move (drag->drag_surface, x, y);
gdk_surface_set_opacity (drag->drag_surface, 1.0 - f);
return G_SOURCE_CONTINUE;
}
static void
-gdk_win32_surface_move (GdkSurface *window,
- gint x, gint y)
+gdk_win32_surface_do_move (GdkSurface *window,
+ gint x, gint y)
{
RECT outer_rect;
GdkWin32Surface *impl;
if (with_move && (width < 0 && height < 0))
{
- gdk_win32_surface_move (window, x, y);
+ gdk_win32_surface_do_move (window, x, y);
}
else
{
gdk_win32_surface_move_resize (surface, FALSE, 0, 0, width, height);
}
+void
+gdk_win32_surface_move (GdkSurface *surface,
+ gint x,
+ gint y)
+{
+ gdk_win32_surface_move_resize (surface, TRUE, x, y, -1, -1);
+}
+
static void
gdk_win32_surface_raise (GdkSurface *window)
{
gboolean do_resize,
gboolean do_paint);
+void gdk_win32_surface_move (GdkSurface *surface,
+ gint x,
+ gint y);
void
gdk_win32_surface_get_queued_window_rect (GdkSurface *surface,
{
GdkX11Drag *drag_x11 = GDK_X11_DRAG (drag);
- gdk_surface_move (drag_x11->drag_surface,
- x_root - drag_x11->hot_x,
- y_root - drag_x11->hot_y);
+ gdk_x11_surface_move (drag_x11->drag_surface,
+ x_root - drag_x11->hot_x,
+ y_root - drag_x11->hot_y);
gdk_surface_raise (drag_x11->drag_surface);
}
t = ease_out_cubic (f);
gdk_surface_show (drag->drag_surface);
- gdk_surface_move (drag->drag_surface,
- drag->last_x + (drag->start_x - drag->last_x) * t,
- drag->last_y + (drag->start_y - drag->last_y) * t);
+ gdk_x11_surface_move (drag->drag_surface,
+ drag->last_x + (drag->start_x - drag->last_x) * t,
+ drag->last_y + (drag->start_y - drag->last_y) * t);
gdk_surface_set_opacity (drag->drag_surface, 1.0 - f);
return G_SOURCE_CONTINUE;
x11_surface_resize (surface, width, height);
}
+void
+gdk_x11_surface_move (GdkSurface *surface,
+ gint x,
+ gint y)
+{
+ gdk_x11_surface_move_resize (surface, TRUE, x, y, -1, -1);
+}
+
static void gdk_x11_surface_restack_toplevel (GdkSurface *surface,
GdkSurface *sibling,
gboolean above);
return;
gdk_monitor_get_geometry (monitor, &geom);
- gdk_surface_move (surface, geom.x, geom.y);
+ gdk_x11_surface_move (surface, geom.x, geom.y);
gdk_surface_set_fullscreen_mode (surface, GDK_FULLSCREEN_ON_CURRENT_MONITOR);
gdk_x11_surface_fullscreen (surface);
x = mv_resize->moveresize_orig_x + dx;
y = mv_resize->moveresize_orig_y + dy;
- gdk_surface_move (mv_resize->moveresize_surface, x, y);
+ gdk_x11_surface_move (mv_resize->moveresize_surface, x, y);
}
}
void gdk_x11_surface_pre_damage (GdkSurface *surface);
+void gdk_x11_surface_move (GdkSurface *surface,
+ gint x,
+ gint y);
+
G_END_DECLS
#endif /* __GDK_X11_SURFACE__ */